<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/top.jsp" %>
	<div class="sub">
		<div class="sub_left">
			<div class="left_tit">
				<img src="${imgUrl}/left_tit.jpg" border="0" />
			</div>
			<ul>
				<c:forEach var = "menu" items="${menuList}">
					<li><a href="#" onClick="goBoardListMain(<c:out value="${menu.menuIndex}" />)"><c:out value="${menu.menuName}" /></a></li>				
				</c:forEach>
			</ul>
		</div>
		<div class="sub_content">
			<div class="title">
				<div class="tit"><img src="${imgUrl}/join_tit.jpg" border="0" /></div>
				<div class="home">HOME > <font color="#4a7ed5">회원가입</font></div>
			</div>
			<div class="content">
				<div class="bg_top"></div>
				<div class="join1">
					<table border="0" cellspacing="0" cellpadding="0" width="677" align="center">
						<tr>
							<td><img src="${imgUrl}/join1_t1.jpg" border="0" /></td>
						</tr>
						<tr>
							<td height="12"></td>
						</tr>
						<tr>
							<td height="1" bgcolor="#e4e4e4"></td>
						</tr>
						<tr>
							<td height="10"></td>
						</tr>
						<tr>
							<td class="textarea"><textarea id="" rows="" cols="">해당 홈페이지에 맞는 회원가입약관을 입력합니다.</textarea></td>
						</tr>
						<tr>
							<td height="14"></td>
						</tr>
						<tr>
							<td height="1" bgcolor="#e4e4e4"></td>
						</tr>
						<tr>
							<td height="2" bgcolor="#fafafa"></td>
						</tr>
						<tr>
							<td height="12"></td>
						</tr>
						<tr>
							<td><input type="checkbox" id="agree1" checked/>회원가입약관의 내용에 동의합니다.</td>
						</tr>
						<tr>
							<td height="30"></td>
						</tr>
						<tr>
							<td><img src="${imgUrl}/join1_t2.jpg" border="0" /></td>
						</tr>
						<tr>
							<td height="12"></td>
						</tr>
						<tr>
							<td height="1" bgcolor="#e4e4e4"></td>
						</tr>
						<tr>
							<td height="10"></td>
						</tr>
						<tr>
							<td class="textarea"><textarea id="" rows="" cols="">해당 홈페이지에 맞는 개인정보취급방침을 입력합니다.</textarea></td>
						</tr>
						<tr>
							<td height="14"></td>
						</tr>
						<tr>
							<td height="1" bgcolor="#e4e4e4"></td>
						</tr>
						<tr>
							<td height="2" bgcolor="#fafafa"></td>
						</tr>
						<tr>
							<td height="12"></td>
						</tr>
						<tr>
							<td><input type="checkbox" id="agree2" checked/>개인정보수집이용안내의 내용에 동의합니다.</td>
						</tr>
					</table>
				</div>
				<div class="bg_bottom"></div>
				<div class="btn">
					<a href="#"><img src="${imgUrl}/join_btn_ok1.jpg" border="0" onclick="agreeAll();" /></a>
					<a href="#"><img src="${imgUrl}/join_btn_no.jpg" border="0" /></a>
				</div>
			</div>
		</div>
	</div>
	<form  id="frm" name="frm" method="post" style="display:none;">
	<input type="text" name="menuIndex" id="menuIndex">	
	</form>
	<script type="text/javascript">
	function agreeAll(){
		if($('#agree1').is(':checked') && $('#agree2').is(':checked')){
		     var $form = $('<form></form>');
		     $form.attr('action', '/user/join2');
		     $form.attr('method', 'post');
		     $form.appendTo('body');
		     
		     var agreed1 = $('<input type="hidden" value="true" name="agreed1">');
		     var agreed2 = $('<input type="hidden" value="true" name="agreed2">');
		 
		     $form.append(agreed1).append(agreed2);
		     $form.submit();
		} else {
			alert('서비스 이용약관에 동의하지 않으셨습니다.');
			return;		
		}
	}
	
	function goBoardListMain(type) {		
		$("#menuIndex").val(type);
		var url = "/board/boardListMain";	
		
		$("#frm").attr("action", url);
		$("#frm").attr("method", "post");
		$("#frm").submit();		
		
		
		return false;
  }
	</script>
<%@ include file="/WEB-INF/views/include/bottom.jsp" %>